home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 8542 / 8542.xpi / components / lastpassext.js < prev    next >
Text File  |  2010-02-14  |  3KB  |  10 lines

  1. const nsILastPassExternal=Components.interfaces.nsILastPassExternal;const nsISupports=Components.interfaces.nsISupports;const CLASS_ID_EXTERNAL=Components.ID("{27befaa9-ce4f-406c-9f3d-b794519d5a03}");const CLASS_NAME_EXTERNAL="LastPass External Javascript XPCOM Component";const CONTRACT_ID_EXTERNAL="@lastpass.com/external/lastpass;1";
  2. var LPExternal=null;var LastPassExternalFactory={createInstance:function(B,A){if(B!=null){throw Components.results.NS_ERROR_NO_AGGREGATION}if(null==LPExternal){LPExternal=new LastPassExternalContainer;var C=Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);
  3. C.logStringMessage("created LPExternal")}return(LPExternal).QueryInterface(A)}};var LastPassExternalModule={registerSelf:function(C,A,D,B){C=C.QueryInterface(Components.interfaces.nsIComponentRegistrar);C.registerFactoryLocation(CLASS_ID_EXTERNAL,CLASS_NAME_EXTERNAL,CONTRACT_ID_EXTERNAL,A,D,B)},unregisterSelf:function(B,C,A){B=B.QueryInterface(Components.interfaces.nsIComponentRegistrar);
  4. B.unregisterFactoryLocation(CLASS_ID_EXTERNAL,C)},getClassObject:function(B,C,A){if(!A.equals(Components.interfaces.nsIFactory)){throw Components.results.NS_ERROR_NOT_IMPLEMENTED}if(C.equals(CLASS_ID_EXTERNAL)){return LastPassExternalFactory}throw Components.results.NS_ERROR_NO_INTERFACE},canUnload:function(A){return true
  5. }};function NSGetModule(B,A){return LastPassExternalModule}function LastPassExternalContainer(){this.QueryInterface=function(A){var B=Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);B.logStringMessage("typeof: "+typeof(nsILastPassExternal));if(!A.equals(nsILastPassExternal)&&!A.equals(nsISupports)){throw Components.results.NS_ERROR_NO_INTERFACE
  6. }return this};this.logoff=function(){var B=Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);try{var A=Components.classes["@lastpass.com/lastpass;1"].getService().wrappedJSObject;if(A&&typeof(A.logoff)=="function"){A.logoff();B.logStringMessage("Called LP.logoff()")
  7. }else{B.logStringMessage("logoff NO LP object or logoff not a function")}}catch(C){B.logStringMessage("err:"+C+" ln:"+C.lineNumber)}};this.loginCheck=function(C){try{var B=Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);var A=Components.classes["@lastpass.com/lastpass;1"].getService().wrappedJSObject;
  8. return;if(A&&typeof(A.lplogincheck)=="function"){A.lplogincheck("lastpassext",C)}else{B.logStringMessage("lplogincheck NOT an accessible function")}}catch(D){B.logStringMessage("err:"+D+" ln:"+D.lineNumber)}};this.refresh=function(){var A=Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);
  9. A.logStringMessage("refresh called")}};
  10.